package com.warmheart.core.ex;

import com.warmheart.core.enums.ResultCode;
import com.warmheart.core.enums.WhEnum;
import com.warmheart.core.ex.base.CoreWhException;

/**
 * 
 * @ClassName: BusinessException
 * @Description: 业务异常，一般为主动抛出的可预见异常（业务条件不满足）
 * @author ZhangJianyang
 * @date 2025-06-16 09:37:02
 *
 */
public class BusinessException extends CoreWhException {

    private static final long serialVersionUID = 1L;

    /**
     * 默认响应类型为业务异常
     */
    @Override
    public WhEnum<Integer> coreWhEnum() {
        return ResultCode.BUSINESS_ERROR;
    }

    public BusinessException() {
    }

    public BusinessException(Throwable e) {
        super(e);
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, Throwable e) {
        super(message, e);
    }

    public BusinessException(WhEnum<Integer> whEnum) {
        super(whEnum);
    }

    public BusinessException(WhEnum<Integer> whEnum, Throwable e) {
        super(whEnum, e);
    }
}
